https://www.cs.sjtu.edu.cn/~li-fang/IEchapter8.pdf